package com.pet.shop.controller.room;

import com.pet.shop.controller.BaseController;
import com.pet.shop.entity.room.Hotel;
import com.pet.shop.service.IBaseService;
import com.pet.shop.service.room.IHotelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@RequestMapping("/web/hotel")
@Controller
public class HotelController extends BaseController<Hotel> {

    @Autowired
    private IHotelService hotelService;
    @Value("${fileViewServer}")
    private String fileViewServer;

    @Override
    public IBaseService<Hotel> getBaseService() {
        return hotelService;
    }

    @RequestMapping("list")
    public ModelAndView list(){
        return new ModelAndView("room/hotelList").addObject("fileViewServer", fileViewServer);
    }
}
